<?php

/**
 * Radcodes - SocialEngine Module
 *
 * @category   Application_Extensions
 * @package    Gmap
 * @copyright  Copyright (c) 2009-2010 Radcodes LLC (http://www.radcodes.com)
 * @license    http://www.radcodes.com/license/
 * @version    $Id$
 * @author     Vincent Van <vincent@radcodes.com>
 */
 
 
class Gmap_View_Helper_GmapMemberMarkers extends Zend_View_Helper_Abstract
{

	/*
	 * @param Radcodes_Lib_Google_Map $google_map
	 * @param array $gmaps
	 */
	public function gmapMemberMarkers(Radcodes_Lib_Google_Map $google_map, $gmaps, $options=array())
	{
		
	  foreach ($gmaps as $gmap)
    {
    	$infowindow_content = $this->view->partial('_map_member_infoWindow.tpl', 'gmap', array('gmap'=>$gmap));
    	
    	$infowindow = $gmap->getMapInfoWindow();
    	$infowindow->setContent($infowindow_content);
    	
      $marker = $gmap->getMapMarker();
      
      $marker->addHtmlInfoWindow($infowindow);

      $google_map->addMarker($marker);
    }
    
    
    $return = $this->view->gmap($google_map, $options);
    
    return $return;

	}
	
	
	
}
